package 传智播客_黑马.java基础.DateTime;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class LearnDate {
    public static void main(String[] args) throws ParseException {
        //无参构造
        System.out.println(new java.util.Date());
        //有参构造
        System.out.println(new java.util.Date());

        //使用simpleDateFormat 来确定时间
        SimpleDateFormat sp = new SimpleDateFormat("yyyy-MM-dd");
        long time = sp.parse("2017-10-9").getTime();
        System.out.println(time);
    }
}
